// pages/agent/agent.js
import {Agent} from '../agent/agent-model.js'
var agent = new Agent();
Page({

	/**
	 * 页面的初始数据
	 */
	data: {
		loadingHidden: false,
		showNote:false,
		// avatarUrl: '../../imgs/icon/user@default.png',
		avatarUrl: 'https://wx.qlogo.cn/mmopen/vi_32/YdNwB0GYpJ2QBicOicxDV8vXGLXNpevLeGnrj5vaACZiaobJI8YaVt5nB22Djb26RMaZl4F3vJE67fc9bxP5ZzRCw/0',
		nickName: '你好盐匠'
	},
	onLoad: function (option) {
		var user={
			name:option.name,
			available_income: option.available_income,
			settled_income: option.settled_income
		}
		this.setData({
			user:user,
		});
	},

	myBankCard:function(){
		wx.navigateTo({
			url: '../bankcard/bankcard',
		})
	},
	chargeMoney:function(){
		wx.navigateTo({
			url: '../charge/charge',
		})
	},
	bill:function(){
		wx.navigateTo({
			url: '../bill/bill',
		})
	},

	/**
	 * 生命周期函数--监听页面初次渲染完成
	 */
	onReady: function () {

	},
	//分享效果
	onShareAppMessage: function () {
		var referral_code = wx.getStorageSync('referral_code');
		return {
			title: '唐潮盐匠-自贡冷吃系列',
			path: 'pages/home/home?referral_code=' + referral_code
		}
	}
})